package com.sumainfor.pc.market.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.dao.CommunityGetMapper;
import com.sumainfor.pc.market.service.CommunityGetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * <p>
 * 根据房源配置主表编号查询房源信息，不分页
 * <p>
 *
 * @author: zhoucong
 *
 * @create: 2019-04-23 16:17
 **/
@Controller
@RequestMapping("/key/CommunityGetExtension")
public class CommunityGetExtensionController {
    @Autowired
    CommunityGetMapper communityGetMapper;

    /**
    * <p>
    * 根据houCon查询
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/getCommunityListss")
    public JsonResult getCommunityListss(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(communityGetMapper.getCommunityList(params));
    }

    /**
     * 根据HouInfoId查询
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getCommunityListHid")
    public JsonResult getCommunityListHid(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(communityGetMapper.getCommunityListHid(params));
    }


}
